Optimal. Leaf size=252 \[ -\frac {b e n \log (d+e x)}{(e h-d i) (g h-f i)}+\frac {a+b \log \left (c (d+e x)^n\right )}{(g h-f i) (h+i x)}+\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{(g h-f i)^2}+\frac {b e n \log (h+i x)}{(e h-d i) (g h-f i)}-\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (h+i x)}{e h-d i}\right )}{(g h-f i)^2}+\frac {b g n \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{(g h-f i)^2}-\frac {b g n \text {Li}_2\left (-\frac {i (d+e x)}{e h-d i}\right )}{(g h-f i)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 252, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 7, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {2465, 2441,
2440, 2438, 2442, 36, 31} \begin {gather*} \frac {b g n \text {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{(g h-f i)^2}-\frac {b g n \text {PolyLog}\left (2,-\frac {i (d+e x)}{e h-d i}\right )}{(g h-f i)^2}+\frac {a+b \log \left (c (d+e x)^n\right )}{(h+i x) (g h-f i)}+\frac {g \log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(g h-f i)^2}-\frac {g \log \left (\frac {e (h+i x)}{e h-d i}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(g h-f i)^2}-\frac {b e n \log (d+e x)}{(e h-d i) (g h-f i)}+\frac {b e n \log (h+i x)}{(e h-d i) (g h-f i)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rule 2438
Rule 2440
Rule 2441
Rule 2442
Rule 2465
Rubi steps
\begin {align*} \int \frac {a+b \log \left (c (d+e x)^n\right )}{(h+222 x)^2 (f+g x)} \, dx &=\int \left (\frac {222 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h) (h+222 x)^2}-\frac {222 g \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2 (h+222 x)}+\frac {g^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2 (f+g x)}\right ) \, dx\\ &=-\frac {(222 g) \int \frac {a+b \log \left (c (d+e x)^n\right )}{h+222 x} \, dx}{(222 f-g h)^2}+\frac {g^2 \int \frac {a+b \log \left (c (d+e x)^n\right )}{f+g x} \, dx}{(222 f-g h)^2}+\frac {222 \int \frac {a+b \log \left (c (d+e x)^n\right )}{(h+222 x)^2} \, dx}{222 f-g h}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{(222 f-g h) (h+222 x)}-\frac {g \log \left (-\frac {e (h+222 x)}{222 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2}+\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{(222 f-g h)^2}+\frac {(b e g n) \int \frac {\log \left (\frac {e (h+222 x)}{-222 d+e h}\right )}{d+e x} \, dx}{(222 f-g h)^2}-\frac {(b e g n) \int \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{(222 f-g h)^2}+\frac {(b e n) \int \frac {1}{(h+222 x) (d+e x)} \, dx}{222 f-g h}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{(222 f-g h) (h+222 x)}-\frac {g \log \left (-\frac {e (h+222 x)}{222 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2}+\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{(222 f-g h)^2}-\frac {(b g n) \text {Subst}\left (\int \frac {\log \left (1+\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{(222 f-g h)^2}+\frac {(b g n) \text {Subst}\left (\int \frac {\log \left (1+\frac {222 x}{-222 d+e h}\right )}{x} \, dx,x,d+e x\right )}{(222 f-g h)^2}+\frac {(222 b e n) \int \frac {1}{h+222 x} \, dx}{(222 d-e h) (222 f-g h)}-\frac {\left (b e^2 n\right ) \int \frac {1}{d+e x} \, dx}{(222 d-e h) (222 f-g h)}\\ &=\frac {b e n \log (h+222 x)}{(222 d-e h) (222 f-g h)}-\frac {b e n \log (d+e x)}{(222 d-e h) (222 f-g h)}-\frac {a+b \log \left (c (d+e x)^n\right )}{(222 f-g h) (h+222 x)}-\frac {g \log \left (-\frac {e (h+222 x)}{222 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2}+\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{(222 f-g h)^2}+\frac {b g n \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{(222 f-g h)^2}-\frac {b g n \text {Li}_2\left (\frac {222 (d+e x)}{222 d-e h}\right )}{(222 f-g h)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 196, normalized size = 0.78 \begin {gather*} \frac {\frac {(g h-f i) \left (a+b \log \left (c (d+e x)^n\right )\right )}{h+i x}+g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )-\frac {b e (g h-f i) n (\log (d+e x)-\log (h+i x))}{e h-d i}-g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (h+i x)}{e h-d i}\right )+b g n \text {Li}_2\left (\frac {g (d+e x)}{-e f+d g}\right )-b g n \text {Li}_2\left (\frac {i (d+e x)}{-e h+d i}\right )}{(g h-f i)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.55, size = 970, normalized size = 3.85
method | result | size |
risch | \(\frac {a g \ln \left (g x +f \right )}{\left (f i -g h \right )^{2}}-\frac {a g \ln \left (i x +h \right )}{\left (f i -g h \right )^{2}}-\frac {a}{\left (f i -g h \right ) \left (i x +h \right )}-\frac {b \ln \left (\left (e x +d \right )^{n}\right ) g \ln \left (i x +h \right )}{\left (f i -g h \right )^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} g \ln \left (i x +h \right )}{2 \left (f i -g h \right )^{2}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} g \ln \left (g x +f \right )}{2 \left (f i -g h \right )^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} g \ln \left (i x +h \right )}{2 \left (f i -g h \right )^{2}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )}{2 \left (f i -g h \right ) \left (i x +h \right )}+\frac {i b \pi \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} g \ln \left (g x +f \right )}{2 \left (f i -g h \right )^{2}}-\frac {b n g \dilog \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{\left (f i -g h \right )^{2}}-\frac {b \ln \left (c \right )}{\left (f i -g h \right ) \left (i x +h \right )}+\frac {b n g \dilog \left (\frac {\left (i x +h \right ) e +d i -e h}{d i -e h}\right )}{\left (f i -g h \right )^{2}}-\frac {b e n \ln \left (e x +d \right )}{\left (f i -g h \right ) \left (d i -e h \right )}+\frac {b \ln \left (\left (e x +d \right )^{n}\right ) g \ln \left (g x +f \right )}{\left (f i -g h \right )^{2}}-\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{\left (f i -g h \right ) \left (i x +h \right )}-\frac {b n g \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{\left (f i -g h \right )^{2}}-\frac {b \ln \left (c \right ) g \ln \left (i x +h \right )}{\left (f i -g h \right )^{2}}+\frac {b \ln \left (c \right ) g \ln \left (g x +f \right )}{\left (f i -g h \right )^{2}}+\frac {i b \pi \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}}{2 \left (f i -g h \right ) \left (i x +h \right )}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right ) g \ln \left (i x +h \right )}{2 \left (f i -g h \right )^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right ) g \ln \left (g x +f \right )}{2 \left (f i -g h \right )^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2 \left (f i -g h \right ) \left (i x +h \right )}+\frac {i b \pi \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} g \ln \left (i x +h \right )}{2 \left (f i -g h \right )^{2}}-\frac {i b \pi \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} g \ln \left (g x +f \right )}{2 \left (f i -g h \right )^{2}}-\frac {i b \pi \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2 \left (f i -g h \right ) \left (i x +h \right )}+\frac {b e n \ln \left (i x +h \right )}{\left (f i -g h \right ) \left (d i -e h \right )}+\frac {b n g \ln \left (i x +h \right ) \ln \left (\frac {\left (i x +h \right ) e +d i -e h}{d i -e h}\right )}{\left (f i -g h \right )^{2}}\) | \(970\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \log {\left (c \left (d + e x\right )^{n} \right )}}{\left (f + g x\right ) \left (h + i x\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{\left (f+g\,x\right )\,{\left (h+i\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________